package com.yanqu.road.entity.enums;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public enum eSeasonRewardType {

    WasheGetScoreZhanLing(1, "瓦舍累计获得荣誉点战令", false),
    WasheScoreRank(2, "瓦舍荣誉点榜单", true),
    WasheTimeLimitTask(3, "瓦舍限时任务", false),
    WasheNewHandScoreArch(4, "瓦舍新手荣誉点成就", false),
    WasheScoreArch(5, "瓦舍荣誉点成就", false),

    JinBiaoScoreRank(6, "锦标赛积分赛排行", true),

    JinBiaoPeakRank(7, "锦标赛巅峰赛排行", true),


    ;

    private static final Map<Integer, eSeasonRewardType> cache = new ConcurrentHashMap<>();

    static {
        for (eSeasonRewardType type : eSeasonRewardType.values()) {
            cache.put(type.getIntValue(), type);
        }
    }

    public static eSeasonRewardType getType(int intValue) {
        return cache.get(intValue);
    }

    // -----------------

    private int intValue;
    private String desc;
    private boolean rankType;

    eSeasonRewardType(int intValue, String desc, boolean rankType) {
        this.intValue = intValue;
        this.desc = desc;
        this.rankType = rankType;
    }

    public int getIntValue() {
        return intValue;
    }

    public boolean isRankType() {
        return rankType;
    }
}
